group { name: "elm/notify/block_events/popup/default";
   inherit: "elm/notify/block_events/default";
   parts.part { "block_events";
      desc { "visible";
         color_class: "/dim/normal/popup";
      }
   }
}

group { name: "elm/notify/block_events/popup/transparent";
   parts {
      part { name: "base"; type: RECT;
         description { state: "default" 0.0;
            color_class: "/dim/normal/popup";
            color: 255 255 255 0; // no cc
         }
         description { state: "clicked" 0.0;
            color_class: "/dim/normal/popup";
            color: 255 255 255 255; // no cc
         }
      }
      program { signal: "mouse,down,1"; source: "base";
         action: SIGNAL_EMIT "elm,action,click" "elm";
         after: "click1";
      }
      program { name: "click1";
         action: STATE_SET "clicked" 0.0;
         target: "base";
         transition: SINUSOIDAL 0.2;
      }
      program { signal: "mouse,up,1"; source: "base";
         action: STATE_SET "default" 0.0;
         target: "base";
         transition: DECELERATE 0.5;
      }
   }
}

group { name: "elm/notify/top/popup/default";
   inherit: "elm/notify/top/default";
#define OVERRIDE_BASE() \
   parts { \
      part { name: "shadow"; mouse_events: 0; \
         description { state: "default" 0.0; \
            rel.to: "base"; \
            WIN_SHADOW; \
            color_class: "/shadow/normal/popup"; \
         } \
      } \
      part { name: "base"; type: RECT; \
         description { state: "default" 0.0; \
            color_class: "/bg/normal/popup/base"; \
         } \
         description { state: "visible" 0.0; \
            color_class: "/bg/normal/popup/base"; \
         } \
      } \
   }
   OVERRIDE_BASE()
}

group { name: "elm/notify/bottom/popup/default";
   inherit: "elm/notify/bottom/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/left/popup/default";
   inherit: "elm/notify/left/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/right/popup/default";
   inherit: "elm/notify/right/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/top_left/popup/default";
   inherit: "elm/notify/top_left/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/top_right/popup/default";
   inherit: "elm/notify/top_right/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/bottom_left/popup/default";
   inherit: "elm/notify/bottom_left/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/bottom_right/popup/default";
   inherit: "elm/notify/bottom_right/default";
   OVERRIDE_BASE()
}

group { name: "elm/notify/center/popup/default";
   inherit: "elm/notify/center/default";
   OVERRIDE_BASE()
}
#undef OVERRIDE_BASE

group { name: "elm/notify/top/popup/transparent";
   inherit: "elm/notify/top/default";
}

group { name: "elm/notify/bottom/popup/transparent";
   inherit: "elm/notify/bottom/default";
}

group { name: "elm/notify/left/popup/transparent";
   inherit: "elm/notify/left/default";
}

group { name: "elm/notify/right/popup/transparent";
   inherit: "elm/notify/right/default";
}

group { name: "elm/notify/top_left/popup/transparent";
   inherit: "elm/notify/top_left/default";
}

group { name: "elm/notify/top_right/popup/transparent";
   inherit: "elm/notify/top_right/default";
}

group { name: "elm/notify/bottom_left/popup/transparent";
   inherit: "elm/notify/bottom_left/default";
}

group { name: "elm/notify/bottom_right/popup/transparent";
   inherit: "elm/notify/bottom_right/default";
}

group { name: "elm/notify/center/popup/transparent";
   inherit: "elm/notify/center/default";
}

group { name: "elm/label/base/popup/default";
   alias: "elm/label/base/popup/transparent";
   styles {
      style { name: "popup_desc_style";
         base: "font="FN" font_size=10 text_class=label align=center color=cc:/fg/normal/popup/text wrap=mixed";
         tag: "br" "\n";
         tag: "hilight" "+ font="FNBD" text_class=label_light";
         tag: "b" "+ font="FNBD" text_class=label_light";
         tag: "whitecolor" "+ color=#fff"; // no cc
         tag: "tab" "\t";
      }
      style { name: "popup_title_style_ellipsis";
         base: "font="FNBD" font_size=10 text_class=label align=center color=cc:/fg/normal/popup/text/title ellipsis=1.0 wrap=mixed";
         tag: "br" "\n";
         tag: "hilight" "+ font="FNBD" text_class=label_light";
         tag: "b" "+ font="FNBD" text_class=label_light";
         tag: "whitecolor" "+ color=#fff"; // no cc
         tag: "tab" "\t";
      }
   }
   parts {
      part { name: "elm.text"; type: TEXTBLOCK; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            text { style: "popup_desc_style";
               min: 0 1;
               max: 0 1;
            }
            rel1.offset: 5 5;
            rel2.offset: -6 -6;
            offscale;
         }
      }
   }
}

group { name: "elm/button/base/popup/default";
   inherit: "elm/button/base/default";
}

group { name: "elm/button/base/popup/transparent";
   inherit: "elm/button/base/anchor";
}

group { name: "elm/popup/base/default";
   alias: "elm/popup/base/transparent";
   styles {
      style { name: "popup_title_style";
         base: "font="FNBD" font_size=10 text_class=label align=center color=cc:/fg/normal/popup/text/title wrap=mixed";
         tag: "br" "\n";
         tag: "hilight" "+ font="FNBD" text_class=label_light";
         tag: "b" "+ font="FNBD" text_class=label_light";
         tag: "whitecolor" "+ color=#fff"; // no cc
         tag: "tab" "\t";
      }
   }
   parts {
      part { name: "base"; type: RECT;
         scale: 1;
         description { state: "default" 0.0;
            min: 240 0;
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.swallow.background"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "base";
         }
      }
      part { name: "elm.bg.title"; type: RECT;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.text.title";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.text.title"; type: TEXTBLOCK;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 0 1;
            text { style: "popup_title_style";
              min: 1 1;
              ellipsis: -1;
            }
            visible: 0;
            rel1.offset: 5 5;
            rel2.offset: -6 5;
            rel2.relative: 1.0 0.0;
            align: 0.5 0.0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "elm.swallow.title.icon"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            align: 0.0 0.5;
            rel1.to_y: "elm.text.title";
            rel2.to_y: "elm.text.title";
            rel2.relative: 0.0 1.0;
            aspect: 1.0 1.0; aspect_preference: VERTICAL;
            visible: 0;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "elm.swallow.content"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            rel1.offset: 5 5;
            rel2.offset: -6 -6;
            offscale;
         }
         description { state: "show_title_area" 0.0;
            inherit: "default" 0.0;
            rel1.relative: 0.0 1.0;
            rel1.to_y: "elm.bg.title";
         }
         description { state: "show_action_area" 0.0;
            inherit: "default" 0.0;
            rel2.relative: 1.0 0.0;
            rel2.to_y: "elm.swallow.action_area";
         }
         description { state: "show_action_title_area" 0.0;
            inherit: "default" 0.0;
            rel1.relative: 0.0 1.0;
            rel1.to_y: "elm.bg.title";
            rel2.relative: 1.0 0.0;
            rel2.to_y: "elm.swallow.action_area";
         }
      }
      part { name: "elm.swallow.action_area"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 0 1;
            align: 0.5 1.0;
            visible: 0;
            rel.to: "base";
            rel1.relative: 0.0 1.0;
            rel1.offset: 5 -6;
            rel2.offset: -6 -6;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }

      part { name: "access.title"; type: RECT; repeat_events: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.bg.title";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "access.body"; type: RECT; repeat_events: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.swallow.content";
            color: 0 0 0 0; // no cc
         }
      }
   }
   programs {
      program { signal: "elm,state,title,icon,visible"; source: "elm";
         action: STATE_SET "visible" 0.0;
         target: "elm.swallow.title.icon";
      }
      program { signal: "elm,state,title,icon,hidden"; source: "elm";
         action: STATE_SET "default" 0.0;
         target: "elm.swallow.title.icon";
      }
      program { signal: "elm,state,title,text,visible"; source: "elm";
         action: STATE_SET "visible" 0.0;
         target: "elm.text.title";
      }
      program { signal: "elm,state,title,text,hidden"; source: "elm";
         action: STATE_SET "default" 0.0;
         target: "elm.text.title";
      }
      program { signal: "elm,state,title_area,visible"; source: "elm";
         script {
            new st[31], Float:vl;
            get_state(PART:"elm.swallow.action_area", st, 30, vl);
            if (!strcmp(st, "visible"))
              set_state(PART:"elm.swallow.content", "show_action_title_area", 0.0);
            else
              set_state(PART:"elm.swallow.content", "show_title_area", 0.0);
            set_state(PART:"elm.text.title", "visible", 0.0);
         }
      }
      program { signal: "elm,state,title_area,hidden"; source: "elm";
         script {
            new st[31], Float:vl;
            get_state(PART:"elm.swallow.action_area", st, 30, vl);
            if (!strcmp(st, "visible"))
              set_state(PART:"elm.swallow.content", "show_action_area", 0.0);
            else
              set_state(PART:"elm.swallow.content", "default", 0.0);
            set_state(PART:"elm.text.title", "default", 0.0);
         }
      }
      program { signal: "elm,state,action_area,visible"; source: "elm";
         script {
            new st[31], Float:vl;
            get_state(PART:"elm.text.title", st, 30, vl);
            if (!strcmp(st, "visible"))
              set_state(PART:"elm.swallow.content", "show_action_title_area", 0.0);
            else
              set_state(PART:"elm.swallow.content", "show_action_area", 0.0);
            set_state(PART:"elm.swallow.action_area", "visible", 0.0);
         }
      }
      program { signal: "elm,state,action_area,hidden"; source: "elm";
         script {
            new st[31], Float:vl;
            get_state(PART:"elm.text.title", st, 30, vl);
            if (!strcmp(st, "visible"))
              set_state(PART:"elm.swallow.content", "show_title_area", 0.0);
            else
              set_state(PART:"elm.swallow.content", "default", 0.0);
            set_state(PART:"elm.swallow.action_area", "default", 0.0);
         }
      }
   }
}

group { name: "elm/popup/content/popup/default";
   alias: "elm/popup/content/popup/transparent";
   alias: "elm/popup/content/popup/subpopup";
   data.item: "scroller_enable" "on";
   parts {
      part { name:"elm.swallow.content"; type: SWALLOW;
         description { state: "default" 0.0;
         }
         description { state: "scroll" 0.0;
            min: 240 0;
         }
      }
   }
   programs {
      program { signal: "elm,scroll,enable"; source: "elm";
         action: STATE_SET "scroll" 0.0;
         target: "elm.swallow.content";
      }
      program { signal: "elm,scroll,disable"; source: "elm";
         action: STATE_SET "default" 0.0;
         target: "elm.swallow.content";
      }
   }
}

group { name: "elm/popup/buttons1/popup/default";
   alias: "elm/popup/buttons1/popup/transparent";
   alias: "elm/popup/buttons1/popup/subpopup";
   data.item: "action_area_height" "80";
   parts {
      part { name:"elm.swallow.content.button1"; type: SWALLOW;
         description { state: "default" 0.0;
         }
      }
   }
}

group { name: "elm/popup/buttons2/popup/default";
   alias: "elm/popup/buttons2/popup/transparent";
   alias: "elm/popup/buttons2/popup/subpopup";
   data.item: "action_area_height" "80";
   parts{
      part{ name:"elm.swallow.content.button1"; type: SWALLOW;
         description { state: "default" 0.0;
            rel2.relative: 0.5 1.0;
         }
      }
      part{ name:"elm.swallow.content.button2"; type: SWALLOW;
         description { state: "default" 0.0;
            rel1.relative: 0.5 0.0;
         }
      }
   }
}

group { name: "elm/popup/buttons3/popup/default";
   alias: "elm/popup/buttons3/popup/transparent";
   alias: "elm/popup/buttons3/popup/subpopup";
   data.item: "action_area_height" "80";
   parts{
      part{ name:"elm.swallow.content.button1"; type: SWALLOW;
         description { state: "default" 0.0;
            rel2.relative: (1/3) 1.0;
         }
      }
      part{ name:"elm.swallow.content.button2"; type: SWALLOW;
         description { state: "default" 0.0;
            rel1.relative: 1.0 0.0;
            rel1.to: "elm.swallow.content.button1";
            rel2.relative: 0.0 1.0;
            rel2.to: "elm.swallow.content.button3";
         }
      }
      part{ name:"elm.swallow.content.button3"; type: SWALLOW;
         description { state: "default" 0.0;
            rel1.relative: (2/3) 0.0;
         }
      }
   }
}

group { name: "elm/popup/item/popup/default";
   inherit: "elm/list/item/default";
   parts {
      part { name: "elm.swallow.content"; type: SWALLOW;
         insert_after: "elm.swallow.icon";
         description { state: "default" 0.0;
            fixed: 0 1;
            rel.to: "elm.swallow.icon";
         }
      }
   }
   programs {
      program { signal: "mouse,down,1"; source: "event";
         action: SIGNAL_EMIT "elm,state,selected" "elm";
      }
      program { signal: "mouse,up,1"; source: "event";
         action: SIGNAL_EMIT "elm,state,unselected" "elm";
      }
      program { signal: "mouse,clicked,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
   }
}

group { name: "elm/popup/base/subpopup";
   inherit: "elm/popup/base/default";
   parts {
      part { name: "pad_closebtn"; type: SPACER;
         description { state: "default" 0.0;
            rel.to: "base";
            rel1.relative: 1 0;
            rel2.relative: 1 0;
            min: 2 2;
            max: 2 2;
            fixed: 1 1;
            align: 0 1;
         }
      }
      part { name: "elm.swallow.closebtn"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "pad_closebtn";
            rel1.relative: 1 0;
            rel2.relative: 1 0;
            align: 0 1;
            fixed: 1 1;
         }
      }
   }
}
